-- GENERATED SPELL FOR [Ashtongue Spiritbinder] --


function spell0_23524(pUnit, Event) --@Chain Heal,Heal--
pUnit:FullCastSpellOnTarget(42027,pUnit)
pUnit:RegisterEvent('Sorts_23524', 1000, 1)
end

function spell1_23524(pUnit, Event) --@Spirit Heal,Heal--
pUnit:FullCastSpellOnTarget(42317,pUnit)
pUnit:RegisterEvent('Sorts_23524', 571, 1)
end

function spell2_23524(pUnit, Event) --@Spirit Heal,Heal--
pUnit:FullCastSpellOnTarget(42318,pUnit)
pUnit:RegisterEvent('Sorts_23524', 586, 1)
end

function spell3_23524(pUnit, Event) --@Spirit Mend,Heal--
pUnit:FullCastSpellOnTarget(42025,pUnit)
pUnit:RegisterEvent('Sorts_23524', 10000, 1)
end

function Sorts_23524(pUnit, Event)
local choix_sorts_23524 = math.random(0, 3)
if choix_sorts_23524 == 0 then
pUnit:RegisterEvent('spell0_23524', 1, 1)
end
if choix_sorts_23524 == 1 then
pUnit:RegisterEvent('spell1_23524', 1, 1)
end
if choix_sorts_23524 == 2 then
pUnit:RegisterEvent('spell2_23524', 1, 1)
end
if choix_sorts_23524 == 3 then
pUnit:RegisterEvent('spell3_23524', 1, 1)
end
end

function mob23524_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23524', math.random(1500, 3000), 1)
end

function mob23524_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23524_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23524_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23524, 1, 'mob23524_Action')
RegisterUnitEvent(23524, 2, 'mob23524_Leave')
RegisterUnitEvent(23524, 3, 'mob23524_Kill')
RegisterUnitEvent(23524, 4, 'mob23524_Die')
